Skip to content

Turn on more Commander CLI tests#116

Merged
AmirSa12 merged 5 commits into
bombshell-dev:mainfrom
shadowspawn:enable-more-commander-tests
Jun 5, 2026
Merged

Turn on more Commander CLI tests#116
AmirSa12 merged 5 commits into
bombshell-dev:mainfrom
shadowspawn:enable-more-commander-tests

Conversation

@shadowspawn
Copy link
Copy Markdown
Contributor

@shadowspawn shadowspawn commented May 28, 2026

I was making changes to the Commander adapter when I noticed that most of the tests were disabled. I did some investigation and some of the problems were the example file used in the tests was not set up the same way as the other adapters.

This PR adds the dev command expected by the tests and turns on related tests.


The other skipped tests are because presumably API/implementation has changed, and custom handlers are not getting installed using old code. I'll have a go at those separately.

// Configure custom completions
for (const command of completion.commands.values()) {
if (command.value === 'lint') {
// Note: Direct handler assignment is not supported in the current API
// Custom completion logic would need to be implemented differently
}
for (const [option, config] of command.options.entries()) {
if (option === '--port') {
config.handler = () => {
return [
{ value: '3000', description: 'Default port' },
{ value: '8080', description: 'Alternative port' },
];
};
}
if (option === '--host') {
config.handler = () => {
return [
{ value: 'localhost', description: 'Local development' },
{ value: '0.0.0.0', description: 'All interfaces' },
];
};
}
if (option === '--mode') {
config.handler = () => {
return [
{ value: 'development', description: 'Development mode' },
{ value: 'production', description: 'Production mode' },
{ value: 'test', description: 'Test mode' },
];
};
}
if (option === '--config') {
config.handler = () => {
return [
{ value: 'config.json', description: 'JSON config file' },
{ value: 'config.yaml', description: 'YAML config file' },
];
};
}
}
}

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 28, 2026

⚠️ No Changeset found

Latest commit: 7c9f37c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tab@116

commit: 7c9f37c

@AmirSa12
Copy link
Copy Markdown
Member

AmirSa12 commented May 29, 2026

Thanks! @shadowspawn
I remember opening #30 for that reason..
I appreciate your help on this, John!

@shadowspawn shadowspawn changed the title Turn on Commander CLI tests Turn on more Commander CLI tests Jun 4, 2026
@shadowspawn shadowspawn marked this pull request as ready for review June 5, 2026 04:04
Copy link
Copy Markdown
Member

@AmirSa12 AmirSa12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!!!

@AmirSa12 AmirSa12 merged commit 47542e9 into bombshell-dev:main Jun 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants